package com.xiao.dynamic_rule.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ClickhouseUtil {
    public static Connection getClickhouseConnection() throws ClassNotFoundException, SQLException {
        //String ckDriver = "com.github.housepower.jdbc.ClickHouseDriver";
        String ckDriver = "ru.yandex.clickhouse.ClickHouseDriver";
        String ckUrl = "jdbc:clickhouse://192.168.10.101:8123/default";
        String table = "yinew_detail";

        Class.forName(ckDriver);
        Connection conn = DriverManager.getConnection(ckUrl,"default","123123");
        return conn;
    }
}
